import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import FastClick from "fastclick";
import VueLazyLoad from "vue-lazyload";
//Toast插件封装
import toast from "components/common/toast";

Vue.config.productionTip = false;

Vue.prototype.$bus = new Vue(); //vue实例作为事件总线

//自定义的插件安装
Vue.use(toast);

//fastclick插件使用
FastClick.attach(document.body);

//使用vue-lazyload插件
Vue.use(VueLazyLoad, {
  loading: require("./assets/img/common/placeholder.png")
});

new Vue({
  render: h => h(App),
  store,
  router
}).$mount("#app");
